﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="NewsAdd.aspx.cs" Inherits="ZLDC.Estate.TM.NewsAdd" %>

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加系统公告</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        
            function Data_Trim(string)  //清楚字符串里空格方法
            {
                var temp = "";
                string = '' + string;
                splitstring = string.split(" ");
                for (i = 0; i < splitstring.length; i++)
                    temp += splitstring[i];
                return temp;
            }


            function Data() {

                if (Data_Trim(document.all["txtTitle"].value) == "") {
                    alert("您没有输入主题名称!");
                    return false;
                }
                if (Data_Trim(document.all["txtTitle"].value).length > 50) {
                    alert("您输入的主题名称不能超过25个中文字符!");
                    return false;
                }
                if (Data_Trim(document.all["FreeTextBox1"].value) == "") {
                    alert("您没有输入主题内容!");
                    return false;
                }
                if (Data_Trim(document.all["FreeTextBox1"].value).length < 5) {
                    alert("您输入的主题内容不能不能少于5个字符!");
                    return false;
                }

            }   
         
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div  style="text-align:center">
        <table  cellpadding="0" cellspacing="1" bordercolor="cdcdcd">
            <tr>
                <td align="center" valign="bottom" bgcolor="#D6D3CE" class="nopic">
                    主题：
                </td>
                <td bgcolor="#FFFFFF" style="text-align: left;">
                    <asp:TextBox ID="txtTitle" runat="server" Width="736px" BorderColor="Silver" BorderWidth="1px"
                        Height="20px"></asp:TextBox>
                </td>
            </tr>
            <tr bgcolor="#D6D3CE">
                <td align="center" valign="top" bgcolor="#D6D3CE" >内容：</td>
                <td  bgcolor="#FFFFFF" style="text-align: left;">
                    <FTB:FreeTextBox ID="FreeTextBox1" Width="740px" Height="420px" AutoConfigure="Default"   runat="server">
                    </FTB:FreeTextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                
                </td>
            </tr>
            <tr>
               <td colspan="2" style="text-align: center;">
               
                   <asp:CheckBox ID="isShow" runat="server" />是否弹出
               
                   <asp:Button ID="btnSave" runat="server"  CssClass="button_bak" Text="发表" 
                       onclick="btnSave_Click"  />               
                             
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;               
                             
                   <asp:Button ID="btnCancle" runat="server" CssClass="button_bak" Text="清空" 
                       onclick="btnCancle_Click" />
               </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
